package com.cheer.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author cheer
 */
@Data
public class OaAdminAddDTO {

    private Integer pid;

    @NotBlank(message = "名称不能为空")
    @Length(max = 30, message = "名称字符数不能超过30")
    private String name;

    @NotBlank(message = "手机号不能为空")
    @Length(max = 11, message = "手机号字符数不能超过11")
    private String phone;

    @NotBlank(message = "密码不能为空")
    @Length(min = 6, message = "密码长度不能小于6位")
    @Length(max = 255, message = "密码长度不能大于255位")
    private String password;

    @NotNull(message = "请选择权限")
    private Integer roleId;

    @Length(max = 30, message = "管理人字符数不能超过30")
    private String pname;
}
